package com.ymttest.database.mapping.godmch;

import com.ymttest.database.model.godmch.markup_config_percentage;
import com.ymttest.database.model.godmch.markup_config_percentageExample;
import com.ymttest.database.model.godmch.markup_config_percentageKey;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;

public interface markup_config_percentageMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table markup_config_percentage
     *
     * @mbggenerated Fri Jul 17 18:25:11 CST 2020
     */
    @SelectProvider(type=markup_config_percentageSqlProvider.class, method="countByExample")
    int countByExample(markup_config_percentageExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table markup_config_percentage
     *
     * @mbggenerated Fri Jul 17 18:25:11 CST 2020
     */
    @DeleteProvider(type=markup_config_percentageSqlProvider.class, method="deleteByExample")
    int deleteByExample(markup_config_percentageExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table markup_config_percentage
     *
     * @mbggenerated Fri Jul 17 18:25:11 CST 2020
     */
    @Delete({
        "delete from markup_config_percentage",
        "where markup_id = #{markup_id,jdbcType=INTEGER}",
          "and agent_type_id = #{agent_type_id,jdbcType=INTEGER}"
    })
    int deleteByPrimaryKey(markup_config_percentageKey key);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table markup_config_percentage
     *
     * @mbggenerated Fri Jul 17 18:25:11 CST 2020
     */
    @Insert({
        "insert into markup_config_percentage (markup_id, agent_type_id, ",
        "percentage, create_time, ",
        "update_time)",
        "values (#{markup_id,jdbcType=INTEGER}, #{agent_type_id,jdbcType=INTEGER}, ",
        "#{percentage,jdbcType=DECIMAL}, #{create_time,jdbcType=TIMESTAMP}, ",
        "#{update_time,jdbcType=TIMESTAMP})"
    })
    int insert(markup_config_percentage record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table markup_config_percentage
     *
     * @mbggenerated Fri Jul 17 18:25:11 CST 2020
     */
    @InsertProvider(type=markup_config_percentageSqlProvider.class, method="insertSelective")
    int insertSelective(markup_config_percentage record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table markup_config_percentage
     *
     * @mbggenerated Fri Jul 17 18:25:11 CST 2020
     */
    @SelectProvider(type=markup_config_percentageSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="markup_id", property="markup_id", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="agent_type_id", property="agent_type_id", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="percentage", property="percentage", jdbcType=JdbcType.DECIMAL),
        @Result(column="create_time", property="create_time", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="update_time", property="update_time", jdbcType=JdbcType.TIMESTAMP)
    })
    List<markup_config_percentage> selectByExample(markup_config_percentageExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table markup_config_percentage
     *
     * @mbggenerated Fri Jul 17 18:25:11 CST 2020
     */
    @Select({
        "select",
        "markup_id, agent_type_id, percentage, create_time, update_time",
        "from markup_config_percentage",
        "where markup_id = #{markup_id,jdbcType=INTEGER}",
          "and agent_type_id = #{agent_type_id,jdbcType=INTEGER}"
    })
    @Results({
        @Result(column="markup_id", property="markup_id", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="agent_type_id", property="agent_type_id", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="percentage", property="percentage", jdbcType=JdbcType.DECIMAL),
        @Result(column="create_time", property="create_time", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="update_time", property="update_time", jdbcType=JdbcType.TIMESTAMP)
    })
    markup_config_percentage selectByPrimaryKey(markup_config_percentageKey key);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table markup_config_percentage
     *
     * @mbggenerated Fri Jul 17 18:25:11 CST 2020
     */
    @UpdateProvider(type=markup_config_percentageSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") markup_config_percentage record, @Param("example") markup_config_percentageExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table markup_config_percentage
     *
     * @mbggenerated Fri Jul 17 18:25:11 CST 2020
     */
    @UpdateProvider(type=markup_config_percentageSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") markup_config_percentage record, @Param("example") markup_config_percentageExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table markup_config_percentage
     *
     * @mbggenerated Fri Jul 17 18:25:11 CST 2020
     */
    @UpdateProvider(type=markup_config_percentageSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(markup_config_percentage record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table markup_config_percentage
     *
     * @mbggenerated Fri Jul 17 18:25:11 CST 2020
     */
    @Update({
        "update markup_config_percentage",
        "set percentage = #{percentage,jdbcType=DECIMAL},",
          "create_time = #{create_time,jdbcType=TIMESTAMP},",
          "update_time = #{update_time,jdbcType=TIMESTAMP}",
        "where markup_id = #{markup_id,jdbcType=INTEGER}",
          "and agent_type_id = #{agent_type_id,jdbcType=INTEGER}"
    })
    int updateByPrimaryKey(markup_config_percentage record);
}